﻿@model ForgotPasswordViewModel
@{
    ViewBag.Title = "Forgot Password";
    ViewBag.SmPageColumns = GalleryConstants.ColumnsAuthenticationSm;
    ViewBag.MdPageColumns = GalleryConstants.ColumnsAuthenticationMd;
}

<section role="main" class="container main-container page-forgot-password">
    @if (!Model.IsPasswordLoginEnabled)
    {
        <div class="deprecate-alert text-center">
            @ViewHelpers.AlertWarning(@<text>@Strings.ForgotPassword_Disabled</text>)
        </div>
    }
    else if (this.Config.Current.DeprecateNuGetPasswordLogins)
    {
        <div class="deprecate-alert text-center">
            @ViewHelpers.AlertPasswordDeprecation()
        </div>
    }

    <div class="row">
        <div class="@ViewHelpers.GetColumnClasses(ViewBag) text-center">
            <h1>Forgot Password</h1>

            <p>We are sorry to hear you forgot your NuGet.org account password. Enter your email below and we will send instructions to reset your password.</p>

            <div class="forgot-form text-left">
                @using (Html.BeginForm())
                {
                    @Html.AntiForgeryToken()

                    <div class="form-group @Html.HasErrorFor(m => m.Email)">
                        @Html.ShowLabelFor(m => m.Email, isrequired: true)
                        @Html.ShowTextBoxFor(m => m.Email, "input-brand")
                        @Html.ShowValidationMessagesFor(m => m.Email)
                    </div>
                    <div class="form-group has-error-brand">
                        @Html.ShowValidationMessagesForEmpty()
                    </div>
                    <div class="form-group">
                        <input id="Submit" type="submit" class="btn btn-brand form-control" value="Send" />
                    </div>
                }
            </div>
        </div>
    </div>
</section>

@section BottomScripts {
    @ViewHelpers.RecaptchaScripts(Config.Current.ReCaptchaPublicKey, "Submit")
}